
import Mock from 'mockjs'
let list = []

export default {
    getStatiesData: () => {
        for (let i = 0; i < 7; i++) {
            list.push(
                Mock.mock({
                    苹果: Mock.Random.float(100, 8000, 0, 0),
                    vivo: Mock.Random.float(100, 8000, 0, 0),
                    oppo: Mock.Random.float(100, 8000, 0, 0),
                    魅族: Mock.Random.float(100, 8000, 0, 0),
                    三星: Mock.Random.float(100, 8000, 0, 0),
                    小米: Mock.Random.float(100, 8000, 0, 0),
                })
            );
        }
        return {
            code: 200,
            data: {
                videoData: [
                    {
                        name: '小米',
                        value: 259

                    },
                    {
                        name: '苹果',
                        value: 99
                    },
                    {
                        name: 'vivo',
                        value: 599
                    },
                    {
                        name: 'oppo',
                        value: 239
                    },
                    {
                        name: '魅族',
                        value: 559
                    },
                    {
                        name: '三星',
                        value: 999
                    }
                ],
                //柱状图
                userData: [
                    {
                        data: '周一',
                        new: 5,
                        active: 200
                    },
                    {
                        data: '周二',
                        new: 5,
                        active: 500
                    },
                    {
                        data: '周三',
                        new: 12,
                        active: 550
                    },
                    {
                        data: '周四',
                        new: 60,
                        active: 800
                    },
                    {
                        data: '周五',
                        new: 65,
                        active: 550
                    },
                    {
                        data: '周六',
                        new: 53,
                        active: 770
                    },
                    {
                        data: '周日',
                        new: 33,
                        active: 170
                    },

                ],
                //折线图
                orderData: {
                    date: ['20191001', '20191002', '20191003', '20191004', '20191005', '20191006', '20191007',],
                    data: list
                },
                tableData: [
                    {
                        name: 'oppo',
                        todayBuy: 500,
                        monthBuy: 2000,
                        totalBuy: 22000
                    },
                    {
                        name: 'oppo',
                        todayBuy: 500,
                        monthBuy: 2000,
                        totalBuy: 22000
                    },
                    {
                        name: 'oppo',
                        todayBuy: 500,
                        monthBuy: 2000,
                        totalBuy: 22000
                    },
                    {
                        name: 'oppo',
                        todayBuy: 500,
                        monthBuy: 2000,
                        totalBuy: 22000
                    },
                    {
                        name: 'oppo',
                        todayBuy: 500,
                        monthBuy: 2000,
                        totalBuy: 22000
                    },
                ]
            }
        }
    }
}